package com.longshihan.carservice.dao;

import com.longshihan.carservice.model.OrderDomain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 购物车dao
 */
@Mapper
public interface OrderDao {

    /**
     * 更新商品
     * @return
     */
    int createOrder(@Param("orderId") String orderId,@Param("userId") String userId,
                    @Param("goods") String goods,@Param("note") String note,
                    @Param("address") String address,@Param("deliverTime") String deliverTime
                    );

    /**
     * 获取用户的订单的信息
     * @return
     */
    OrderDomain getUserOrderGoods(@Param("orderId") String orderId);

    /**
     * 获取用户所有商品
     * @return
     */
    List<OrderDomain> getUserOrder(@Param("userId") String userId);

}
